<?php
/**
 * Created by PhpStorm.
 * User: liyu
 * Date: 2018/4/26
 * Time: 下午6:27
 */

namespace app\api\model;


class WgDevice extends Base
{
    protected $autoWriteTimestamp = 'datetime';

    public function user()
    {
        return $this->hasOne('User','guid','guid')->field(['name','guid']);
    }

    public function wgArea()
    {
        return $this->hasOne('WgArea','id','area_id')->field(['name','id']);
    }
}